Copyright © 2023 STMicroelectronics
The PDM2PCM library has the function to decimate and filter out a Pulse Density Modulated (PDM) stream from a digital microphone, in order to convert it to a Pulse Code Modulated (PCM) signal output stream.
The PCM output stream is implemented at a sampling rate of 16kHz with a 16 bits resolution. Various decimation factors can be configured, in order to adapt to various PDM clocks. Digital microphone gain is configurable at any time and allows 1dB step in the range of -12dB to +51dB.
None
None
None
None
None
None
None
None
Major APIs change
Only one filtering function is provided PDM_Filter()
The decimation factor, endianness, and bit order are now configured once at the PDM_Filter_Init() function call
Decimation factor, demodulation loop size and digital gain can be changed on-the-fly using PDM_Filter_setConfig() function
This version is not backward compatible with previous V2.1.0 and earlier version, below guidelines on how to use the new APIs Library initialization Once the memory is allocated, some routines must be called to initialize the PDM2PCM library static memory:
Furthermore, has the PDM2PCM library runs on STM32 devices, CRC HW block must be enabled and reset.
Module execution
None
None
None
None
None
None
None
None